<template>
  <div class="aiseo-home-banner">
    <div class="img-box">
      <img
        class="img-normal"
        @click="handleClickTo"
        src="@/assets/image/pageHome/roundBTN-blur.png"
        alt=""
      />
      <img
        class="img-hover"
        @click="handleClickTo"
        src="@/assets/image/pageHome/roundBTN-hover.png"
        alt=""
      />
      <span class="image-text"   @click="handleClickTo">>立即定制&lt;</span>
    </div>
    <!-- <Vue3Lottie
      class='lottie-file'
      width="300px"
      height="300px"
      :animation-data="AiseoBtnOut"
    /> -->
    <el-icon @click="handleClickTo" style="cursor: pointer;"><ArrowDown /></el-icon>
    <ul class="banner-list">
      <li class="banner-list-item">助力网站成长</li>
      <li>文章撰写降本增效</li>
      <li>网站整体运营</li>
    </ul>
    <div @click="handleOpenChat" class="button-outer mt-40">
      <el-button class="learn-more">了解更多</el-button>
    </div>
  </div>
</template>

<script setup>
import { ArrowDown } from "@element-plus/icons-vue";
import { ref } from "vue";
import EventBus from "@/utils/eventBus.js";

const popperVisible = ref(false);
const handleClickTo = () => {
  EventBus.emit("clicktoCustomizedServices");
};
const handleOpenChat = () => {
  EventBus.emit("openCustomerChat", {
    message: "您好，我想了解更多信息",
  });
};
</script>

<style lang="scss" scoped>
$bannerColor: #f5f5f5;
.aiseo-home-banner {
  height: 1080px;
  width: 100%;
  background: url('@/assets/image/logo/20240619172641.webp');
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  background-size: cover;
  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
  }
  .img-box {
    width: 360px;
    height: 360px;
    position: relative;
    z-index: 2;
    .image-text {
      position: absolute;
      left: 50%;
      bottom: 43px;
      transform: translateX(-50%);
      font-weight: bold;
      font-size: 16px;
      color: #333333;
      opacity: 0;
      transition: all 0.5s;
	  cursor: pointer;
    }
    .img-normal {
      width: 300px;
      height: 300px;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      opacity: 1;
      transition: all 0.5s;
    }
    .img-hover {
      width: 300px;
      height: 300px;
      opacity: 0;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.5s;
    }
    &:hover {
      .img-normal {
        width: 360px;
        height: 360px;
        opacity: 0;
        transition: all 0.5s;
      }
      .img-hover {
        width: 360px;
        height: 360px;
        opacity: 1;
        transition: all 0.5s;
      }
      .image-text {
        opacity: 1;
        z-index: 3;
        transition: all 0.5s;
      }
    }
  }
  // .lottie-file{
  //   opacity: 0.9;
  //   z-index: 2;
  //   cursor: pointer;
  // }
  img {
    width: 300px;
    height: 300px;
    opacity: 0.9;
    z-index: 2;
    cursor: pointer;
  }
  .el-icon {
    color: #fff;
    font-size: 32px;
    margin-top: 78px;
    margin-bottom: 60px;
    z-index: 2;
  }
  .banner-list {
    display: flex;
    align-items: center;
    z-index: 2;
    letter-spacing: 3px;
    li {
      font-size: 16px;
      color: #f5f5f5;
      & + li::before {
        content: "";
        display: inline-block;
        width: 2px;
        height: 12px;
        background: #fff;
        margin: 0 24px;
      }
    }
  }

  .button-outer {
    z-index: 3;
    width: 218px;
    height: 57px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
    box-sizing: border-box;

    .learn-more {
      width: 170px;
      height: 49px;
      border-radius: 29px;
      border: 1px solid #ffffff;
      background: none;
      font-weight: 300;
      font-size: 18px;
      color: #ffffff;
      transition: all 0.5s;
      box-sizing: border-box;
      letter-spacing: 3px;
    }
    &:hover {
      border: 2px solid #e62e3d;
      padding: 2px;
      transition: all 0.5s;
      .learn-more {
        background: #e62e3d;
        border: none;
        width: 208px;
        transition: all 0.5s;
      }
    }
  }

  // .banner-content {
  //   width: $aiseoHomeWidth;
  //   height: 300px;
  //   margin: 113px auto;
  //   // padding-left:150px;
  //   h1 {
  //     font-family: Microsoft YaHei, Microsoft YaHei;
  //     font-weight: bold;
  //     font-size: 48px;
  //     color: #121212;
  //   }
  //   section {
  //     font-family: Microsoft YaHei, Microsoft YaHei;
  //     font-weight: 400;
  //     font-size: 24px;
  //     color: #4d4d4d;
  //     > p + p {
  //       margin-top: 16px;
  //     }
  //   }
  //   .learn-more {
  //     margin-top: 80px;
  //   }
  // }
}
</style>
<style lang="scss">
.customerSeviceButton-popover-class {
  padding: 0 !important;
  width: 360px !important;
  height: 650px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 0 !important;
}
</style>
